<?php
/**
 * Created by PhpStorm.
 * User: Antique
 * Date: 2021/12/15
 * Time: 下午 10:56
 */
include_once '../tools/common.php';
include_once '../tools/DbTools.php';
$is_login = getLoginStatus();
if (!$is_login) {
    echo '尚未登入，<a href="../user/loginUi.php">请登入</a>';
    die;
} else {
    session_start();
    $CardId=$_SESSION[$_COOKIE['Token']]['CardId'];
    DbTools::InitDb();
$sql="select * from bankcard where AccountId=(select AccountId from bankcard where CardId='".$CardId."')";
    $result= DbTools::select($sql);
for($i=0;$i<count($result);$i++){
echo $result[$i]['CardNo']."  余额:".$result[$i]['CardMoney']."<br >";
}
};